#ifndef HISTORY_TRACKLINE_PRIVATE_H
#define HISTORY_TRACKLINE_PRIVATE_H
#include <qlist.h>
#include "DynamicEntity.h"

class HistoryTrackLinePrivate : public HistoryTrackLine
{
public:
	HistoryTrackLinePrivate();
	~HistoryTrackLinePrivate();
public:
	QString getId()const { return id; }

	void setColor(const QString& newColor) { color = newColor; }
	QString getColor()const { return color; }

	void setLineWidth(double newLineWidth) { lineWidth = newLineWidth; }
	double getLineWidth() const { return lineWidth; }
public:
	quint32 getPointNum() { return trackPoints.size(); }
	HistoryTrackPoint* getTrackPointByIndex(quint32 index){return trackPoints.at(index);}
	
	HistoryTrackPoint* createTrackPoint(double lon,double lat,double alt);

	void appendTrackPoint(HistoryTrackPoint* point);
	void insertTrackPoint(HistoryTrackPoint* point,quint32 index);
	void removeTrackPointByIndex(quint32 index);
	void removeAllPoints();

	bool isEmpty();

	bool getPointVisible() const;
	void setPointVisible(bool visible);
	int  getPointSize() const;
	void setPointSize(int pointSize);
private:
	QString id;
	QString color = "#0000ffff";
	double lineWidth = 1.0;
	QList<HistoryTrackPoint*> trackPoints;
	bool pointVisible = true;
	double pointSize = 2.0;
};

#endif
